package org.example.design.interpreter.test1;

/**
 * @author huangshen
 * @version 0
 * @description 终端表达
 * @since 2022/2/14 14:14
 */
public class TerminalExpression implements Expression {

    private final String data;

    public TerminalExpression(String data){
        this.data = data;
    }

    @Override
    public boolean interpret(String context) {
        return context.contains(data);
    }
}
